<!--# layout("/common/layout.html",{"jsBase":"/js/admin/product/"}){ -->

<form class="layui-form layui-form-pane" id="updateForm">
    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">商品名称</label>
                <div class="layui-input-inline">
                    <input type="text" id="name" name="name" value="${product.name}" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">商品成本</label>
                <div class="layui-input-inline">
                    <input type="text" id="cost" name="cost" value="${product.cost}" class="layui-input">
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">商品折扣</label>
                <div class="layui-input-inline">
                    <input type="text" id="discount" name="discount" value="${product.discount}" class="layui-input">
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-inline">
                    <input type="text" id="remark" name="remark" value="${product.remark}" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">createdAt</label>
                <div class="layui-input-inline">
                    <input type="text" id="createdAt" name="createdAt" value="${product.createdAt," yyyy-MM-dd"}"
                    class="layui-input input-date" >
                </div>
            </div>
        </div>
    </div>
    <!-- 业务对象须有hidden字段，保存delFlag和version字段-->
    <input type="hidden" name="delFlag" value=${product.delFlag}/>
    <input type="hidden" name="id" value=${product.id}/>
    <layui:submitButtons id="updateButton"/>
</form>
<!--#} -->
<script>
    layui.use(['edit'], function () {
        var productEdit = layui.edit
        productEdit.init();
    });
</script>
